package com.example.supplychainbackend.entity;

import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Entity
@Table(name = "enterprise_cert")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class EnterpriseCertEntity {
    @Id
    private Long eid;

    String name;
    String id;
    String idCard;
    String trustCode;
    String license;
    String code;
    String tax;

    Integer status;

    String	userName;
    String	enterpriseName;
    Boolean	onChain;
    String	transactionId;
    String	commitTime;
    String	userId;
    String	enterpriseId;

    @OneToMany(cascade = CascadeType.ALL,orphanRemoval = true)
    @JoinColumn(name = "enterprise_id")
    List<EnterpriseCertStageEntity> progress;

}
